﻿Public Class UserProperty
    Property mName As String
    Private mValue As String
    Public Sub New()
        Me.New(Nothing, Nothing)
    End Sub
    ''' <summary>
    ''' 实例化对象
    ''' </summary>
    ''' <param name="name">属性名称</param>
    ''' <param name="val">属性值</param>
    Public Sub New(ByVal name As String, ByVal val As String)
        mName = name
        mValue = val
    End Sub
    ''' <summary>
    ''' 属性名称
    ''' </summary>
    ''' <returns></returns>
    Public Property name() As String
        Get
            Return mName
        End Get
        Set(val As String)
            mName = val
        End Set
    End Property
    ''' <summary>
    ''' 属性值
    ''' </summary>
    ''' <returns></returns>
    Public Property value() As String
        Get
            Return mValue
        End Get
        Set(val As String)
            mValue = val
        End Set
    End Property
    Public Overloads Function Equals(obj As Object) As Boolean
        If obj Is GetType(UserProperty) Then
            Return Me.mName.Equals(obj.name) And Me.mValue.Equals(obj.value)
        End If
        Return False
    End Function
    Public Overloads Function getHashCode() As Integer
        Return Me.mName.GetHashCode Xor Me.mValue.GetHashCode
    End Function
End Class
